  <?php if ($error_warning) { ?>
  <div class="alert alert-error"><?php echo $error_warning; ?><a class="close" data-dismiss="alert">×</a></div>
  <?php } ?>
  <div class="box">
    <div class="heading">
      <h2><?php echo $heading_title; ?></h2>
    </div>
    <div class="content">
		  			<table >
				          <tr>
				            <td><span class="required">*</span> <?php echo "菜单名称1"; ?>:</td>
				            <td><input type="text" name="menu_name"  id="menu_name" value="" />
				             </td>
				          </tr>
	     			 </table>
     			 		<input type="hidden" name="p_menu_id" id="p_menu_id" value="0"/>
     					<div class="buttons"><button  id="submitButton"  class="btn btn-primary"><span><?php echo $button_save; ?></span></button></div>
		  		</span>
		  </div>	
    </div>
  </div>
  
  <script type="text/javascript">
<!--
$(document).ready(function(){
	
$('#submitButton').bind('click',function(){
	var menu_name = $('#menu_name').val();
	$.ajax({
		url: '<?php echo $action;?>'+"&token=<?php echo $token;?>",
		type: 'POST',
		dataType: 'json',
		data: 'name=' + menu_name+"&url=''&type=''&p_id=0&f_id="+'<?php echo $f_id;?>',
		error: function(XMLHttpRequest, textStatus, errorThrown) {
            alert(XMLHttpRequest.text);
        },
		success: function(data) {
			if(data.status=='success')
			{
				 location.reload();
			}
			else{
				alert("创建错误");
			}
		}
	});
	
});
});
//-->
</script>
  

